import { Toast } from 'antd-mobile'

export const ShowLoading = (msg = '') => {
    Toast.clear()
    Toast.show({
        icon: 'loading',
        content: msg,
    })
}


export const ShowSuccess = (msg = '成功') => {
    Toast.clear()
    Toast.show({
        icon: 'success',
        content: msg,
    })
}

export const ShowError = (msg = '失败') => {
    Toast.clear()
    Toast.show({
        icon: 'fail',
        content: msg,
        duration: 1000,
    })
}

export const ShowMsg = (msg = '失败') => {
    Toast.clear()
    Toast.show({
        afterClose: () => {
        },
        content: msg,
    })
}

